package com.zhongxiangspace.mapper;

import com.zhongxiangspace.entity.House;
import com.zhongxiangspace.entity.QueryAnalyzer;
import com.zhongxiangspace.entity.VO.QueryAnalyzerOffice;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 房源
 */
public interface HouseMapper {
    /**
     * 插入房源
     * @param house
     * @return
     */
    boolean inster(House house);

    /**
     * 房源data
     * @param queryAnalyzer 条件
     * @return
     */
    List<Map<String,Object>> queryAll(QueryAnalyzer queryAnalyzer);

    /**
     *逻辑删除
     * @param id
     * @return
     */
    boolean delete(@Param("id") Integer id);
    /**
     * 获取单条
     * @param id
     * @return
     */
    House queryOne(@Param("id")Integer id);

    /**
     * 更新data
     * @param house
     * @return
     */
    boolean updata(House house);

    /**
     * 获取房源信息
     * @param queryAnalyzerOffice
     * @return
     */
    List<House> queryBHList(QueryAnalyzerOffice queryAnalyzerOffice);

    /**
     * 精选房源
     * @param queryAnalyzerOffice
     * @return
     */
    List<Map<String, Object>> queryAllhouse(QueryAnalyzerOffice queryAnalyzerOffice);
}
